import xadmin
from .models import CourseBanner,Course,HotSearchWords,Lesson,Video,Resource
from .models import Question,Paper,PaperList


class HotSearchWordsAdmin:
    list_display = ["keywords","add_time"]


class GourseImageAdmin:
    list_display = ["image"]


class CourseAdmin:
    list_display = ["name","desc","learn_times","students","fav_nums","image"]


class LessonAdmin:
    list_display = ["course","name","add_time"]


class VideoAdmin:
    list_display = ["lesson","name","learn_times","add_time"]


class CourseResourceAdmin:
    list_display = ["course","name","downloads","add_time"]


class QuestionAdmin:
    list_display = ["course","questionType","content","answer"]


class PaperAdmin:
    list_display = ["course","question","paper_name"]


class PaperListAdmin:
    list_display = ["course","name","is_allow"]


xadmin.site.register(Resource,CourseResourceAdmin)
xadmin.site.register(Video,VideoAdmin)
xadmin.site.register(Lesson,LessonAdmin)
xadmin.site.register(Course,CourseAdmin)
xadmin.site.register(CourseBanner,GourseImageAdmin)
xadmin.site.register(HotSearchWords,HotSearchWordsAdmin)
xadmin.site.register(Question,QuestionAdmin)
xadmin.site.register(Paper,PaperAdmin)
xadmin.site.register(PaperList,PaperListAdmin)

